import { atom } from "recoil";
interface HomeStateDefault {
    elevators: any[],
    homeData: any
}

interface DetailStateDefault {
    address?: string,
    videoUrl?: string,
    number?: string,
    deviceClass?: string,
    deviceSpec?: string,
    releaseDate?: string,
    floor?: string,
    station?: string,
    door?: string,
    userParty?: string,
    userPartyTelephone?: string,
    userPartyPeople?: string,
    maintenancePartyTelephone?: string,
    maintenancePartyPeople?: string,
    maintenanceParty?: string,
    nextMaintenanceDate?: string,
    lastModifiedDate?: string,
}

const defaultData: HomeStateDefault = {
    elevators: [],
    homeData: {}
}

const detailDefaultData: DetailStateDefault = {}

export const homeState = atom({
    key: "homeState",
    default: defaultData
});

export const detailState = atom({
    key: "detailState",
    default: detailDefaultData
});

export const websocketDataState = atom({
    key: "websocketDataState",
    default: {}
});
